home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / Open Transport / Sample Code / NetFractal™ / ES stuff□ / DrawPoint.cpp < prev    next >
Encoding:
Text File  |  1996-11-19  |  575 b   |  39 lines  |  [TEXT/MPCC]

  1. //    DrawPoint.cpp
  2.  
  3. #include "DrawPoint.h"
  4. #include "APane.h"
  5.  
  6.  
  7. struct DataDesc {
  8.     long    rowBytes;
  9.     long    rowSize;
  10.     long    numRows;
  11.     long    xPos;
  12.     long    yPos;
  13.     unsigned char data[4]; // actually more...
  14. };
  15.  
  16.  
  17. DrawPoint::DrawPoint(
  18.     const char *protocol,
  19.     const char *address,
  20.     short port,
  21.     APane *aPane) :
  22.     InPoint(protocol, address, port)
  23. {
  24.     fPane = aPane;
  25. }
  26.  
  27.  
  28. void
  29. DrawPoint::DoSomethingWithTheData(
  30.     void *data,
  31.     long size)
  32. {
  33.     DataDesc *desc = (DataDesc *)data;
  34.  
  35.     if (fPane) {
  36.         fPane->SetData(desc->data, desc->rowBytes, desc->rowSize, desc->numRows, desc->xPos, desc->yPos);
  37.     }
  38. }
  39.